Skip to content

Port #403: --min-filesize to skip small files - #16

Merged
martinus merged 1 commit into
masterfrom
feature/min-filesize
Jul 15, 2026
Merged

Port #403: --min-filesize to skip small files#16
martinus merged 1 commit into
masterfrom
feature/min-filesize

Conversation

@martinus

Copy link
Copy Markdown
Owner

Ports markfasheh/duperemove#403 by Andreas K. Huettel (@akhuettel).

Adds -m/--min-filesize=N: regular files below N bytes are skipped during scanning — a big speedup on trees with many tiny files (which rarely dedupe usefully). Folds the existing empty-file skip into one threshold in check_file(); min_filesize defaults to 1, so the default behaviour (skip only empty files) is unchanged. --min-filesize=0 is rejected. Man-page entry + integration test included.

/simplify applied: use the harness mkrand helper in the test, fix the man-page ordering (the new entry had split the -B section), and tighten the now-stale check_file doc comment. 42 tests pass.

🤖 Generated with Claude Code

Ports markfasheh#403 by Andreas K. Huettel.

Add -m/--min-filesize=N: regular files smaller than N bytes are skipped
during scanning. Trees with many tiny files (which rarely dedupe
usefully) scan much faster. Implemented by folding the existing
empty-file skip into one threshold check in check_file(); min_filesize
defaults to 1, so the default behaviour (skip only empty files) is
unchanged. Rejects 0. Adds a man-page entry and an integration test.

Co-authored-by: Andreas K. Huettel <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
@martinus
martinus merged commit 24a600d into master Jul 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant